function loadjscssfile(filename, filetype) {
    if (filetype == "js") { //if filename is a external JavaScript file
        var fileref = document.createElement('script')
        fileref.setAttribute("type", "text/javascript")
        fileref.setAttribute("src", filename)
    }
    else if (filetype == "css") { //if filename is an external CSS file
        var fileref = document.createElement("link")
        fileref.setAttribute("rel", "stylesheet")
        fileref.setAttribute("type", "text/css")
        fileref.setAttribute("href", filename)
    }
    else if (filetype == "icon") {
        var fileref = document.createElement("link")
        fileref.setAttribute("rel", "shortcut icon")
        fileref.setAttribute("type", "image/x-icon")
        fileref.setAttribute("href", filename)
    }
    if (typeof fileref != "undefined")
        document.getElementsByTagName("head")[0].appendChild(fileref)
}

var bar = document.getElementsByClassName('bar')[0];
bar.style.width = "0%";

supply.listen('text/css', function(payload, filename) {
    //console.log(filename);
});

supply.files({
    stylesheet: [
        'reset.css',
        'font.css',
        'jquery-ui-1.10.3.custom.min.css',
        'uberstrap.css',
        'unleashed.css',
        'unleashed-responsive.css',
        'unleashed-new.css',
        'redactor.css',
        'reports.css',
        'print.css',
        'canvas.css',
        'bootstrap-tour.css',
        'loading.css',
    ]
});
loadjscssfile("/assets/fav.ico", "icon");
loadjscssfile("/CSS/Desktop/reset.css", "css");
loadjscssfile("/CSS/Desktop/font.css", "css");
loadjscssfile("/Libs/jqueryui/css/ui-darkness/jquery-ui-1.10.3.custom.min.css", "css");
loadjscssfile("/CSS/Desktop/uberstrap.css", "css");
loadjscssfile("/CSS/Desktop/unleashed.css", "css");
loadjscssfile("/CSS/Desktop/unleashed-responsive.css", "css");
loadjscssfile("/CSS/Desktop/unleashed-new.css", "css");
loadjscssfile("/CSS/Desktop/redactor.css", "css");
loadjscssfile("/CSS/Desktop/reports.css", "css");
loadjscssfile("/CSS/Desktop/print.css", "css");
loadjscssfile("/CSS/Desktop/canvas.css", "css");
loadjscssfile("/CSS/Desktop/loading.css", "css");
loadjscssfile("/CSS/Desktop/bootstrap-tour.css", "css");
loadjscssfile("/JS/Desktop/firstload.js", "js");
loadjscssfile("/JS/Desktop/raphael-min.js", "js");
loadjscssfile("/Libs/highchart/js/highcharts.js", "js");
loadjscssfile("/JS/Desktop/base64.js", "js");
loadjscssfile("/JS/Desktop/stuff.js", "js");
loadjscssfile("/JS/Desktop/graphSupporter.js", "js");
loadjscssfile("/JS/Desktop/soapclient.js", "js");
loadjscssfile("/JS/Desktop/ndatetime-1.4.0.min.js", "js");
loadjscssfile("/Libs/jqueryui/js/jquery-ui-1.10.3.custom.min.js", "js");